package com.mano.mall.web.pay.feign;

import com.mano.mall.api.dto.pay.output.PaymentChannelDTO;
import com.mano.mall.api.pay.PaymentChannelService;
import com.mano.mall.common.base.BaseApiService;
import com.mano.mall.common.base.BaseResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;

import java.util.List;

@FeignClient(value = "mano-mall-pay",fallback = PaymentChannelFeignCallBack.class)
public interface PaymentChannelFeign extends PaymentChannelService {
}

@Component
class PaymentChannelFeignCallBack extends BaseApiService implements PaymentChannelFeign{
    @Override
    public BaseResponse<List<PaymentChannelDTO>> selectAll() {
        return setResultError("服务器忙，请稍后重试");
    }
}